/**
 * <p>Title: MaterialPackage</p>
 * <p>Description: The entity of MaterialPackage</p>
 * <p>Copyright: Shanghai Batchsight Pharmaceutical Technologies, Inc. Copyright(c) 2016</p>
 * @author qianpengji
 * @version 1.0
 * <pre>Histroy:
 *       2016-11-22  qianpengji  Create
 *</pre>
*/
package cn.jhg.account.entity;

import java.io.Serializable;

import org.bson.Document;



public class MaterialPackage implements Serializable{
	
	private int id=0;//物料件id
	private String seqNo=null;//顺序号（等于空表示所有）
	private int labId=0;//标签id
	private double quantity=0;
	private int statId=0;//状态id（等于0表示所有）
	private int batId=0;//批次id（等于0表示所有）
	private int locTranId=0;//转移位置id（等于0表示所有）
	private int locStoId=0;//存储位置id（等于0表示所有）
	private String propId=null;//保存属性 id
	private String uom;//单位
	private int uomId;//单位id
	private Document metadata=null;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getSeqNo() {
		return seqNo;
	}
	public void setSeqNo(String seqNo) {
		this.seqNo = seqNo;
	}
	public int getLabId() {
		return labId;
	}
	public void setLabId(int labId) {
		this.labId = labId;
	}
	public double getQuantity() {
		return quantity;
	}
	public void setQuantity(double quantity) {
		this.quantity = quantity;
	}
	public int getStatId() {
		return statId;
	}
	public void setStatId(int statId) {
		this.statId = statId;
	}
	public int getBatId() {
		return batId;
	}
	public void setBatId(int batId) {
		this.batId = batId;
	}
	public int getLocTranId() {
		return locTranId;
	}
	public void setLocTranId(int locTranId) {
		this.locTranId = locTranId;
	}
	public int getLocStoId() {
		return locStoId;
	}
	public void setLocStoId(int locStoId) {
		this.locStoId = locStoId;
	}
	public String getPropId() {
		return propId;
	}
	public void setPropId(String propId) {
		this.propId = propId;
	}
	public Document getMetadata() {
		return metadata;
	}
	public void setMetadata(Document metadata) {
		this.metadata = metadata;
	}
	
	@Override
	public String toString() {
		return "MaterialPackage [id=" + id + ", seqNo=" + seqNo + ", labId=" + labId + ", quantity=" + quantity
				+ ", statId=" + statId + ", batId=" + batId + ", locTranId=" + locTranId + ", locStoId=" + locStoId
				+ ", propId=" + propId + ", uom=" + uom + ", uomId=" + uomId + ", metadata=" + metadata + "]";
	}
	public String getUom() {
		return uom;
	}
	public void setUom(String uom) {
		this.uom = uom;
	}
	public int getUomId() {
		return uomId;
	}
	public void setUomId(int uomId) {
		this.uomId = uomId;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + batId;
		result = prime * result + id;
		result = prime * result + labId;
		result = prime * result + locStoId;
		result = prime * result + locTranId;
		result = prime * result + ((metadata == null) ? 0 : metadata.hashCode());
		result = prime * result + ((propId == null) ? 0 : propId.hashCode());
		long temp;
		temp = Double.doubleToLongBits(quantity);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + ((seqNo == null) ? 0 : seqNo.hashCode());
		result = prime * result + statId;
		result = prime * result + ((uom == null) ? 0 : uom.hashCode());
		result = prime * result + uomId;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MaterialPackage other = (MaterialPackage) obj;
		if (batId != other.batId)
			return false;
		if (id != other.id)
			return false;
		if (labId != other.labId)
			return false;
		if (locStoId != other.locStoId)
			return false;
		if (locTranId != other.locTranId)
			return false;
		if (metadata == null) {
			if (other.metadata != null)
				return false;
		} else if (!metadata.equals(other.metadata))
			return false;
		if (propId == null) {
			if (other.propId != null)
				return false;
		} else if (!propId.equals(other.propId))
			return false;
		if (Double.doubleToLongBits(quantity) != Double.doubleToLongBits(other.quantity))
			return false;
		if (seqNo == null) {
			if (other.seqNo != null)
				return false;
		} else if (!seqNo.equals(other.seqNo))
			return false;
		if (statId != other.statId)
			return false;
		if (uom == null) {
			if (other.uom != null)
				return false;
		} else if (!uom.equals(other.uom))
			return false;
		if (uomId != other.uomId)
			return false;
		return true;
	}
	
	
	
	
	
	
	
	

}
